package uk.ac.lkl.lpp.ui;



import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

//import java.util.ArrayList;
//import java.util.HashMap;
//import java.util.Map;

import javax.swing.JCheckBox;
import javax.swing.JPanel;

//import javax.swing.table.TableModel;

import uk.ac.lkl.lpp.model.FieldGroup;
import uk.ac.lkl.lpp.model.TeachingMethodTableModel;
//import uk.ac.lkl.lpp.ui.TeachingMethodsTablePanel;

import uk.ac.lkl.lpp.model.ldo.TeachingMethod;


public class CTableTeachingMethodFieldGroupHandler extends JPanel {
	private static final long serialVersionUID = 1L;

    private TeachingMethodTableModel tableModel;

    private FieldGroup<TeachingMethod> fieldGroup;

    private JCheckBox visibilityCheckBox;


    public CTableTeachingMethodFieldGroupHandler(TeachingMethodTableModel tableModel,
            CTable table,
            FieldGroup<TeachingMethod> fieldGroup) {
        this.tableModel = tableModel;
        this.fieldGroup = fieldGroup;

        String fieldGroupName = fieldGroup.getName();
        visibilityCheckBox = new JCheckBox(fieldGroupName);
        add(visibilityCheckBox);
        visibilityCheckBox.setSelected(true);

        visibilityCheckBox.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                processActionPerformed();
            }
        });

    }


    private void processActionPerformed() {
        if (visibilityCheckBox.isSelected()) {

        }
        else {

        }
    }
}
